package com.javabasic.testinterface;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;

public class Person {
    @NotNull
    private String name;
    @NotNull
    private Integer age;
    @NotNull
    private String sex;
    @Max(value = 200,message = "最高长度为200cm")
    private Integer height;

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                ", height=" + height +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getHeight() {
        return height;
    }

    public void setHeight(Integer height) {
        this.height = height;
    }
}
